# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.BareMetalSolution.V2.Model.NfsExport do
  @moduledoc """
  A NFS export entry.

  ## Attributes

  *   `allowDev` (*type:* `boolean()`, *default:* `nil`) - Allow dev flag in NfsShare AllowedClientsRequest.
  *   `allowSuid` (*type:* `boolean()`, *default:* `nil`) - Allow the setuid flag.
  *   `cidr` (*type:* `String.t`, *default:* `nil`) - A CIDR range.
  *   `machineId` (*type:* `String.t`, *default:* `nil`) - Either a single machine, identified by an ID, or a comma-separated list of machine IDs.
  *   `networkId` (*type:* `String.t`, *default:* `nil`) - Network to use to publish the export.
  *   `noRootSquash` (*type:* `boolean()`, *default:* `nil`) - Disable root squashing, which is a feature of NFS. Root squash is a special mapping of the remote superuser (root) identity when using identity authentication.
  *   `permissions` (*type:* `String.t`, *default:* `nil`) - Export permissions.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :allowDev => boolean() | nil,
          :allowSuid => boolean() | nil,
          :cidr => String.t() | nil,
          :machineId => String.t() | nil,
          :networkId => String.t() | nil,
          :noRootSquash => boolean() | nil,
          :permissions => String.t() | nil
        }

  field(:allowDev)
  field(:allowSuid)
  field(:cidr)
  field(:machineId)
  field(:networkId)
  field(:noRootSquash)
  field(:permissions)
end

defimpl Poison.Decoder, for: GoogleApi.BareMetalSolution.V2.Model.NfsExport do
  def decode(value, options) do
    GoogleApi.BareMetalSolution.V2.Model.NfsExport.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.BareMetalSolution.V2.Model.NfsExport do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
